home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19990725-20000114 / 000456_news@columbia.edu _Thu Jan 13 19:55:06 2000.msg < prev    next >
Internet Message Format  |  2020-01-01  |  4KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id TAA26067
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Thu, 13 Jan 2000 19:55:06 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id TAA29286
  7.     for kermit.misc@watsun.cc.columbia.edu; Thu, 13 Jan 2000 19:50:42 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Case Study #6: Streaming
  11. Date: 14 Jan 2000 00:50:40 GMT
  12. Organization: Columbia University
  13. Message-ID: <85lrt0$sj3$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@columbia.edu
  15.  
  16.  
  17. One of the goals for C-Kermit 7.0 was to make Kermit file transfer
  18. comparable in speed to FTP on TCP/IP connections.  Early experiments using
  19. long packets and large window sizes gave excellent results when certain
  20. platforms were involved.  But with other platforms, the results were
  21. discouraging -- throughput was only about 10% of what we expected.
  22.  
  23. To make a rather long story short, this severe degredation in speed was
  24. caused not by anything in Kermit itself, but rather by the underlying
  25. TCP/IP stack when it implemented certain heuristics such as the Nagle
  26. Algorithm and/or Delayed ACK.  These are triggered when the file receiver
  27. sends a Kermit ACK (acknowledgement packet), which is quite short.  The
  28. TCP stack hangs on to it for some amount of time -- say 200 milliseconds --
  29. before letting it go, in hopes that by then it will have something more
  30. to transmit.
  31.  
  32. But 200 milliseconds is a long time on a ten-million-bit-per-second
  33. connection.  It's long enough to transmit 2,000,000 bits of data.  Once
  34. the file sender is blocked waiting for a delayed Kermit ACK, which happens
  35. as soon as its send window fills up, throughput takes a nosedive.
  36.  
  37. The only way around this problem is for the file receive NOT to send ACKs.
  38. Then the file sender can "stream" the data continuously -- just like FTP
  39. does.
  40.  
  41. But if the file receiver doesn't send ACKs, there can be no error
  42. recovery.  Errors can be detected, but if any occur, they are fatal.  But
  43. since it's a TCP/IP connection there are not going to be any non-fatal
  44. errors, by the very definition of TCP.
  45.  
  46. So we introduced streaming in the latest round of Kermit releases:
  47. C-Kermit 7.0, G-Kermit 1.00, Kermit 95 1.1.17, and MS-DOS Kermit 3.16
  48. (still in Beta).  Streaming is used automatically when, both Kermit
  49. programs know about it and the Kermit program that made the connection
  50. tells the Kermit on the far end that the connection is reliable; the two
  51. Kermits agree to stream.  And when they stream, transfers go fast.
  52.  
  53. Exactly how fast depends on how you made the connection.  If it's a Telnet
  54. or Rlogin connection, it's going through several layers of overhead that
  55. FTP doesn't have: the Telnet or Rlogin server -- and the pseudoterminal
  56. and driver -- on the far end.  The amount of overhead depends on the
  57. implementation.
  58.  
  59. On the other hand, if you have a direct socket-to-socket connection
  60. between two Kermit programs, you should get about the same speed as FTP.
  61. How do you get a direct socket-to-socket connection?  One way, which is
  62. not terribly convenient, is described on page 127 of "Using C-Kermit" (the
  63. "set host *" method).  But now there's a better way: the Internet Kermit
  64. Service (IKSD).  We'll talk about that in a future installment, but in the
  65. meantime you can visit:
  66.  
  67.   http://www.columbia.edu/kermit/cuiksd.html
  68.  
  69. for an introduction.
  70.  
  71. Streaming can be used not only on TCP/IP connections, but any other
  72. reliable transport, such as X.25.  But it is not -- and should not be --
  73. used on serial connections; even if you are using error-correcting modems,
  74. there is no guarantee of reliable transport between the modem and the
  75. application -- for example, there can be flow-control failures.
  76.  
  77. For more about streaming, read Section 4.20 of the ckermit2.txt file.
  78.  
  79. - Frank